<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="text/html;charset=utf-8">
<title>修改密码</title>
</head>
<link href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="resources/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="resources/css/index.css" rel="stylesheet">

<link href="resources/bootstrap/css/bootstrapValidator.min.css" rel="stylesheet">
<link href="resources/bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet">

<body>
	<s:include value="../header-common.jsp" />
	<div class="container-fluid">
		<div class="row">
			<h1 style="text-align:center;text-shadow:1px 1px;">修改密码</h1>
		</div>

		<div class="row">
			<s:if test="actionErrors.size()>0 || fieldErrors.size()>0">
				<div
					class="alert alert-danger col-sm-7 col-sm-offset-2">
					<s:actionerror />
				</div>
			</s:if>
		</div>
		<s:form id="checkUpdate" action="checkUpdatePwd" method="post" 
			class="form-horizontal container-fluid">
		<div class="form-group">
			<label class="col-sm-3 control-label">我的账户</label>
			<div class="col-sm-6">
				<div class="input-group">
					<input type="email" class="form-control" name="user.email" readonly value="${user.email}">
					<span class="input-group-addon"> 
						<span class="glyphicon glyphicon-envelope"></span>
					</span>
				</div>
			</div>
		</div>
		<input style="display:none;" name="user.loginType" value="${user.loginType }">
		<div class="form-group">
			<label class="col-sm-3 control-label">请输入旧密码</label>
			<div class="col-sm-6">
				<div class="input-group col-xs-12">
					<input type="password" id="pwd" class="form-control" 
						placeholder="请输入旧密码" name="password"
						data-bv-notempty data-bv-notempty-message="用户密码不能为空."
						data-bv-stringlength data-bv-stringlength-min="6">
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">新密码</label>
			<div class="col-sm-6">
				<div class="input-group col-xs-12">
					<input type="password" id="password1" class="form-control" 
						name="user.password" placeholder="Password"
						data-bv-notempty data-bv-notempty-message="用户密码不能为空."
						data-bv-stringlength data-bv-stringlength-min="6"
						data-bv-identical="true"
						data-bv-identical-field="employee.againPwd"
						data-bv-identical-message="两次密码不一样">
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">再次输入</label>
			<div class="col-sm-6">
				<div class="input-group col-xs-12">
					<input type="password" id="password2" class="form-control" 
						name="employee.againPwd" placeholder="Again"
						data-bv-identical="true" data-bv-identical-field="user.password"
						data-bv-identical-message="两次密码不一样">
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-7">
				<div class="btn-group btn-group-justified">
					<a class="btn btn-info" style="padding:0;">
						<button type="submit" id="ok"
							style="width:100%;background:none;border:0;margin:0;padding:0;">确认修改</button>
					</a> <a class="btn btn-info"><button type="reset"
							style="width:100%;background:none;border:0;margin:0;">重置</button></a>
				</div>
			</div>
		</div>
		</s:form>
	</div>
	<script src="resources/bootstrap/js/jquery.min.js"></script>
	<script src="resources/bootstrap/js/bootstrap.min.js"></script>
	
	<script	src="resources/bootstrap/js/bootstrapValidator.min.js"></script>
	<script	src="resources/bootstrap/js/zh_CN.min.js"></script>
	<script src="resources/bootstrap/js/moment.min.js"></script>
	<script	src="resources/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
	
	<script src="resources/js/register.js"></script>
</body>
</html>
